<?php use_javascript('login/login.js') ?>
<?php slot('title') ?>
<?php echo __('Mximouse Login Page') ?>
<?php end_slot() ?>

<?php slot('i18n') ?>
,"An email has been sent to":"<?php echo __("An email has been sent to") ?>"
,"Sending mail":"<?php echo __("Sending mail") ?>"
<?php end_slot() ?>

<div class="login_top">
    <div class="login_bot">
        <h1><?php echo __('Login') ?>
        </h1>
        <div class="login_repeat">
            <div class="form login_frm">
                <div id="alerts">
                    <?php if ($sf_user->hasFlash('message')): ?>
                        <?php include_partial('messages/alertMessage', array('_alert'     => 'error', '_alertData' => array('Error', $sf_user->getFlash('message')))) ?>
                    <?php endif ?>
                </div>
                <form id="login" method="POST" action="<?php echo url_for('@Login') ?>">
                    <?php echo $form['_csrf_token']->render(); ?>

                    <input type="hidden" value="<?php echo $sf_request->getUri() ?>" name="url" />
                    <div class="field">
                        <label class="lbl" for="name"><?php echo $form['username']->renderLabelName() ?></label>
                        <?php echo $form['username']->render(array('class' => 'txtbox medium')) ?>
                    </div>
                    <div class="field">
                        <label class="lbl" for="name"><?php echo $form['password']->renderLabelName() ?> </label>
                        <?php echo $form['password']->render(array('class'        => 'txtbox medium', 'autocomplete' => 'false')) ?>
                    </div>
                    <?php //add condition for captcha here ?>
                    <?php if ($numberOfLoginTyries >= 4): ?>
                        <div class="field">
                            <label class="lbl" for="name"><?php echo __('Captcha') ?> </label>
                            <a href='' onClick='return false' title='<?php echo __('Reload image') ?>'>
                                <img src="/captcha?<?php echo time(); ?>" onClick='this.src="/captcha?r=" + Math.random() + "&amp;reload=1"'/>
                            </a>
                        </div>
                        <div class="field">
                            <label class="lbl"><?php echo __('Enter Numbers ') ?>  </label>
                            <input name="login[captcha]" id="login_captcha" class="txtbox medium" value="<?php echo $sf_params->get('captcha') ?>" />
                            <br/>
                        </div>
                    <?php endif; ?>
                    <div class="field nolbl">
                        <input type="checkbox" value="checked" name="remmember"/> 
                        <label><?php echo __('Remember me') ?></label>
                        <a href="#" id="frgt_pss">
                            <?php echo __('Forgot your password') ?>
                        </a>
                    </div>

                    <div class="field btn_cont">
                        <input type="submit" class="btn rfloat" value="<?php echo __('Sign In') ?>" name="submit" />
                        <div class="clear">
                        </div>

                    </div>
                </form>
                <div class="clear">
                </div>
            </div>    
        </div>    
    </div>    
</div>    

<div id="forgot_pass" title="Forgot Password" style="display: NONE">
    <form action="<?php echo url_for('RequestNewPassword') ?>" method="post" id="requestNewPassword">
        <?php echo __('Username') ?> : <input type="text" name="uname" />
        <input type="submit" value="<?php echo __('send') ?>" />
        <div id="requestPasswordMsg"></div>
    </form>
</div>